﻿using Domain.Entity.In;
using Domain.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Domain.Entity.search;

namespace Application.Instock_hService
{
    public interface IInstock_hService
    {
        //分页查询入库单
        Task<FenYe<Instock_h>> GetInstock_h(FenYe<Instock_h> fenYe, string? code, string? type, int? status, int? whid);

        //高级查询
        Task<FenYe<Instock_h>> GetAdvancedInstock_h(FenYe<Instock_h> fenYe, string? code, string? starttotal, string? endtotal, string? startdate, string? enddate, string? startnum, string? endnum, int? status, string? type, int? whid, string? createname, string? startcreatetime, string? endcreatetime, string? approvername, string? startapprovertime, string? endapprovertime, string? inuser, string? inorder);


        //添加入库单
        Task<int> AddInstock_h(AddInstock_hDto addInstock_HDto);


        //修改单据状态
        Task<int> UpdateStatus(int instockid, int status, string approvername, string approvertime);


        //根据id查询
        Task<Instock_h> GetInstock_hById(int instockid);

        //修改入库单
        Task<int> UpdateInstock_h(UpdateInstock_hDto updateInstock_HDto);


        //删除入库单
        Task<int> DeleteInstock_h(int id);


        //修改单据状态(撤销)
        Task<int> UpdateStatus(int instockid, int status);

        //根据货品id查询入库记录
        Task<List<Instock_h>> GetAllInstock_h(int procid);

        //根据关联单号查询入库记录
        Task<List<Instock_h>> GetAllInstock_hByCode(string code);

        //入库统计
        Task<Instock_hTJResult> Instock_hTJ(string? timeType, string? code, int? whid, string? instarttime, string? inendtime, string? starttime, string? endtime, string inType, int? page, int? pagesize);

        //供应商id查
        Task<FenYe<Instock_h>> GetInstock_hSup(FenYe<Instock_h> fenYe, int sup_id);

        //客户id查
        Task<FenYe<Instock_h>> GetInstock_hCust(FenYe<Instock_h> fenYe, int cust_id);
    }
}
